<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单管理</title>
<lui:context/>
</head>
<u:View basePath="/res-system/menu/" res="jquery.ztree" delayLoadJs="false" userCSS="menu" userJS="menu">
<body>
	<lui:boards>
	   <lui:board width="40%" boardTitle="菜单树">
	       <!-- 查询菜单 -->
	       <lui:ajax url="${ctx }/sys/menu/findAll" id="queryMenuTreeAjax"/>
	       <!-- 保存菜单 -->
	       <lui:ajax url="${ctx }/sys/menu/save" id="saveMenuAjax" type="post" onSuccess="SysMenuPage.onSaveSucc"/>
	       <lui:oper-bar items="add,sub,save,refresh" onAdd="SysMenuPage.add" onSub="SysMenuPage.del"
	           onRefresh="SysMenuPage.refresh" onSave="SysMenuPage.save"/>
	       <lui:tree nodeTitleKey="resName" nodeIdKey="resId" ajax="queryMenuTreeAjax" id="menuTree"
	            parentIdKey="resPid" dataStructure="array" nodeNameKey="resName" nodeChildrenKey="children"
	            onCurrentNodeSelected="SysMenuPage.onSelected" maxLayer="3" expandAll="true"/>
	   </lui:board>
	   <lui:board width="60%" boardTitle="菜单明细">
	   <form id="menuDetailFrm" class="m-cust">
	       <input type="hidden" id=resId name="resId" >
           <div class="row form-group m-form-group">
               <div class="col-md-2 col-xs-2">
                   <label for="resName" class="m-label ">菜单名称：</label>
               </div>
               <div class="col-md-5 col-xs-5">
                   <input type="text" id="resName" name="resName" class="form-control m-input" data-v0-errorText="" 
                       data-v0-func="" data-v0-params=""
                       onchange="SysMenuPage.onValueChanged(this)" maxlength="32">
               </div>
           </div>
           <div class="row form-group m-form-group">
               <div class="col-md-2 col-xs-2">
                   <label for=resPath class="m-label ">链接地址：</label>
               </div>
               <div class="col-md-5 col-xs-5">
                   <input type="text" id="resPath" name="resPath" class="form-control m-input"
                       onchange="SysMenuPage.onValueChanged(this)" maxlength="200">
               </div>
           </div>
           <div class="row form-group m-form-group">
               <div class="col-md-2 col-xs-2">
                   <label for=resExt1 class="m-label ">图标：</label>
               </div>
               <div class="col-md-5 col-xs-5">
                   <input type="text" id="resExt1" name="resExt1" class="form-control m-input"
                       onchange="SysMenuPage.onValueChanged(this)" maxlength="64">
               </div>
           </div>
           <div class="row form-group m-form-group">
               <div class="col-md-2 col-xs-2">
                   <label for=weight class="m-label ">同级顺序：</label>
               </div>
               <div class="col-md-5 col-xs-5">
                   <input type="number" id="weight" name="weight" class="form-control m-input"
                       onchange="SysMenuPage.onValueChanged(this)" min="1" max="99" value="1">
               </div>
           </div>
           <div class="row form-group m-form-group">
               <div class="col-md-2 col-xs-2">
                   <label for=enabled class="m-label ">状态：</label>
               </div>
               <div class="col-md-5 col-xs-5">
                   <select class="form-control m-input" id="enabled" name="enabled" onchange="SysMenuPage.onValueChanged(this)">
                       <option selected="selected" value="1">正常</option>
                       <option value="0">禁用</option>
                   </select>
               </div>
           </div>
	   </form>
	   </lui:board>
	</lui:boards>
</body>
</u:View>